<?php
/**
 * Created by PhpStorm.
 * User: ytlmi
 * Date: 2018/2/3
 * Time: 14:08
 */

namespace app\lab\model;
use think\Exception;
use think\Model;

class Kit extends Model
{
    protected $table = 'lab_kit';
    //基因座
    public function getKitMarkerAttr($value)
    {
        if ($a=unserialize($value)){
            return $a;
        }else{
            return [];
        }
    }
    public  function setKitMarkerAttr($value)
    {
        if(is_array($value)){
            return serialize($value);
        }else{
            throw new Exception('基因座格式错误');
        }
    }
}